var app = require('http').createServer(handler);
var io = require('socket.io')(app);

app.listen(6002, '192.168.1.109', function () {
    console.log('Server is running!');
});

function handler(req, res) {
    res.writeHead(200);
    res.end('');
}

io.on('connection', function (socket) {
console.log('connected-------------------');
io.emit('sarang','ulandi ---');
    socket.on('ulinix', function () {
        console.log('message:asdasdsd +++++++++++++++++++++');
        io.emit('almas', 'heheehehehhe');
    });
    socket.on('disconnect', function () {
        console.log('user disconnected');
    });
});
